<div class="row">
    <div class="span1 text-right">
        <h1>
            <?php echo $this->Html->link('<i class="icon-arrow-left-3"></i>', '/Admins', array('escape' => false, 'title' => 'Back')) ?>
        </h1>
    </div>
    <div class="span11">
        <div class="span8 text-left">
            <h3 class="widget-title ">List All <?php echo $title;?></h3>
        </div>
        <div class="span4 text-right">
            <h3>
                <?php echo $this->Html->link('<i class="icon-plus-2"></i> Add', '/Projects/add/'.$propertyId.'/'.$projectTypeId, array('escape' => false, 'title' => 'Add New')) ?>
            </h3>
        </div>
        <div class="span12 no-margin">
            <table width="100%">

                <thead class="border-bottom">
                    <tr>
                        <th class="text-center" width='5%'>No</th>
                        <th  class="text-center" width='5%'>Status</th>
                        <th class="text-left">Name</th>
                        <th class="text-center" width='15%'>Actions</th>
                    </tr>
                </thead>
                <tbody>
                    <?php if (isset($lists) && sizeof($lists) != 0) { ?>
                        <?php $i = 1; ?>
                        <?php foreach ($lists as $a): ?>                        
                            <tr>
                                <td class="text-center"><?php echo $i ?></td>
                                <td class="text-center"><?php echo $this->Html->link('<i class="icon-stop '.($a['Project']['status']=='no'?'c-gray':'c-green').'"></i>', '/Projects/updateStatus/' . $a['Project']['id'].'/'.$a['Project']['status'].'/'.$propertyId, array('escape' => false,'title'=>'Click to change status')) ?></td>
                                <td><?php echo $a['ProjectDetail'][0]['title'].'  ['.$a['ProjectDetail'][0]['language'].']' ?></td>
                                <td class="text-center">
                                    <?php echo $this->Html->link('<i class="icon-monitor"></i>', '/Projects/view/' . $a['Project']['id'], array('escape' => false, 'title' => 'View Details','target'=>'_blank')) ?> 
                                    &nbsp;&nbsp;|&nbsp;&nbsp;
                                    <?php echo $this->Html->link('<i class="icon-pencil"></i>', '/Projects/edit/'.$a['Project']['id'], array('escape' => false, 'title' => 'View Details')) ?> 
                                    &nbsp;&nbsp;|&nbsp;&nbsp;
                                    <?php echo $this->Html->link('<i class="icon-remove"></i>', '/Projects/delete/' . $a['Project']['id'], array('escape' => false, 'title' => 'Delete'), 'Do you want to remove this project?') ?> 
                                </td>
                            </tr>
                            <?php $i++; ?>
                        <?php endforeach; ?> 
                    <?php }else { ?>
                        <tr>
                            <td colspan="3">
                                <h5 class="text-center c-red margin-top">Not found project.</h5>
                            </td>
                        </tr>
                    <?php } ?>
                </tbody>

            </table>
        </div>

    </div>
</div>